function [qvalue,pvalue] = discreteFourierTransform(epsilon)
    n = length(epsilon);
    X = 2*epsilon - 1;
    f = fft(X);
    m = abs(f(1:floor(n/2)));
    count = 0;
    upperBound = sqrt(2.995732274*n);
    for i = 1:floor(n/2)
        if m(i) < upperBound
            count = count + 1;
        end
    end
    N_l = count;
    N_o = floor(0.95*n/2.0);
    d = (N_l - N_o)/sqrt(n/(3.8*0.95*0.05));

    pvalue = erfc(abs(d)/sqrt(2));
    qvalue = erfc(d/sqrt(2))/2;
end

